

from flask import Flask,make_response,json,jsonify

app = Flask(__name__)
app.config['JSON_AS_ASSCII'] =False

data = {'name': '张'}

@app.route('/index' )
def index_response():
    response = make_response(json.dumps(data,ensure_ascii=False))
    response.mimetype = 'application/json'
    return response

@app.route('/index2')
def index_jsonify():
    return jsonify(data)



if __name__ == '__main__':
    app.run()